home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / essentls / DMusProd / data1.cab / Tutorial-RawElements / FarmScript.txt < prev    next >
Encoding:
Text File  |  2001-10-16  |  1.5 KB  |  76 lines

  1. ' This script creates an interface for the Farm Game score.
  2.  
  3. ' These three routines play the Intro at the next marker, and
  4. ' then the background segment. Any notes already playing will 
  5. ' not cut off. The PlayFlag variable keeps track of which segment
  6. ' is currently playing so it can be stopped.
  7.  
  8. dim PlayFlag
  9.  
  10. sub dmBGNight
  11.      BGNight.play(PlayIntro)
  12.      PlayFlag = 1
  13. end sub
  14.  
  15. sub dmBGPredawn
  16.      BGPredawn.Play(PlayIntro+AtMarker+NoCutOff)
  17.      PlayFlag = 2
  18. end sub 
  19.  
  20. sub dmBGDawn
  21.      BGDawn.Play(PlayIntro+AtMarker+NoCutOff)
  22.      PlayFlag = 3
  23. end sub
  24.  
  25. ' Stops background segments
  26.  
  27. sub dmAllStop
  28.      Select Case PlayFlag
  29.           Case 1
  30.                BGNight.stop
  31.           Case 2
  32.                BGPredawn.stop
  33.           Case 3
  34.                BGDawn.stop
  35.      End Select
  36. end sub
  37.  
  38. ' Plays the end pattern, then stops
  39.  
  40. sub dmEnding
  41.     BGNight.Play(PlayEnd+AtMarker+NoCutOff)
  42.     BGNight.stop(AtImmediate)
  43. end sub
  44.  
  45. ' Plays SSBird as a secondary segment and starts on the beat
  46.  
  47. sub dmSSBird
  48.      SSBird.Play(IsSecondary+AtBeat)
  49. end sub
  50.  
  51. ' These routines play the sound effects as secondary segments
  52.  
  53. sub dmSfxCow
  54.      SfxCow.Play(IsSecondary)
  55. end sub 
  56.  
  57. sub dmSfxSheep
  58.      SfxSheep.Play(IsSecondary)
  59. end sub
  60.  
  61. sub dmSfxCougar
  62.      SfxCougar.Play(IsSecondary)
  63. end sub
  64.  
  65. sub dmSfxWolf
  66.      SfxWolf.Play(IsSecondary)
  67. end sub
  68.  
  69. sub dmSfxAlarm
  70.      SfxAlarm.Play(IsSecondary)
  71. end sub
  72.  
  73. Sub dmSfxRooster
  74.      SfxRooster.Play(IsSecondary)
  75. end sub
  76.